package com.day24;

public class Test {
    public static void main(String[] args) {
        //非静态方法调用(需要实例化new一个对象，再通过c去调用方法(静态方法))
        System.out.println("非静态方法调用");
        Compute c=new Compute();
        int day=c.day(3,4);
        System.out.println(day);

        //静态方法调用
        System.out.println("静态方法调用");
        int sum=Compute.sum(3,4);
        System.out.println(sum);

        int sum1=Compute.sum(1,2,3);
        System.out.println(sum1);

        double sum2=Compute.sum(3.3,5);
        System.out.println(sum2);

        //有参无返回值的构造方法调用(直接类名点方法名即可调用)
        System.out.println("无参数方法调用");
        Compute.test1("萌萌",12);
        Compute.test1(22,"萌萌");
    }
}
